Обновить

I2P over Yggdrasil: anonymity in mesh networks

Время на прочтение 5 min
Количество просмотров 17K

I2P (Invisible Internet Protocol) – a free tool for organizing anonymous communications via the Internet. It is a peer-to-peer network in which each user, by default, is a potential link in an anonymous chain of other network participants. I2P traffic is encrypted and cannot be analyzed. There is no concept of a “guard” node in I2P, which is present in the Tor network: there is no permanent node through which access to the network is made. User interaction with I2P on the home provider side is identified as a chaotic connection to random hosts. The number of client connections with a white IP varies on average around four thousand. In addition to the payload, this includes the exchange of service information with other network routers and transit traffic.

Prerequisites

A significant weak point of the I2P network is the need to contact one of the starting nodes via the regular Internet when first starting. A packet with the initial network pattern in the form of several random routers and the node that sends it are called resid. Starter nodes are maintained by enthusiasts, their list is publicly available and often undergoes changes due to ordinary human circumstances. The bottleneck lies in the ability on the provider’s side to identify most calls to the resid through monitoring DNS queries, as well as in blocking the domains of the starting nodes, which will make the first launch difficult for an inexperienced user, because will require the use of a proxy or VPN.

Blocking a request to resid on the provider's side
Blocking a request to resid on the provider's side

Unlike the regular Internet, I2P users without a dedicated address have a worse quality of using the hidden network than subscribers with a white IP. This is due to the constant need for direct communication with other routers on the network. Each router publishes its address, which includes encryption keys, an IP address, and a port for receiving messages. Obviously, reaching a network host behind a NAT server is not an easy task.

Difference between a user with a dedicated IP and a user behind NAT
Difference between a user with a dedicated IP and a user behind NAT

However, the operation of routers without a dedicated address is possible: a client of a network behind NAT has to constantly maintain an active UDP connection, reserving a port on the provider’s output server, to which calls will be transferred to the client. This scenario is very complicated, especially when it comes to initializing a connection from the outside. The mechanics of client operation behind NAT is a work of engineering that deserves a separate article.

Briefly about Yggdrasil

Yggdrasil Network – one of the few functional mesh network protocols. The main concept is automatic routing in the internal IPv6 subnet (200::/7) and absolute scalability. Yggdrasil is a completely peer-to-peer network: there are no “master nodes” to which any global responsibility is delegated. Is an ideological continuation of the CJDNS (Hyperboria) project).

The abstract idea of ​​a mesh network puts performance, privacy and ease of use at the forefront: traffic encryption and a low barrier to entry for new users. Yggdrasil is not an anonymity tool, because... The nodes closest to the user see his real network interfaces on the local network, or the IP address when connecting to a public peer via the Internet. Mesh networks are used in organizing pseudo-local networks, connecting remote computers into one IPv6 network (similar to Hamachi for playing Minecraft and other multiplayer games). Also serves for organizing other intranet resources such as websites and VoIP telephony.

First attempts at integration

A small note

Описанные ниже нововведения на момент публикации касаются только i2pd – I2P-роутера на C++. Клиент Yggdrasil на устройство устанавливается отдельно.

The I2P router publishes its addresses, including IPv6, if it is enabled in the config and is actually available. Since Yggdrasil does not provide the user with a local proxy, but with a full-fledged network interface (using the TUN driver from WireGuard), until recently, an I2P router published an IPv6 address from the Yggdrasil subnet. Since there were more than one or even two users with the IPv6 protocol enabled in the I2P router configuration and Yggdrasil installed, it was periodically possible to see that the I2P client (router) communicated with other Yggdrasil addresses.

However, the following disadvantages are evident::

  1. access to the resid should ultimately be carried out via the regular Internet;

  2. The IPv6-Yggdrasil address published by the router is unknown and inaccessible for the vast majority of I2P users;

  3. successful launch of an I2P router on a Yggdrasil-Only device is unlikely due to the possible absence of nodes with an IPv6-Yggdrasil address in the router's resid or local database.

The beginning of full compatibility

From version 2.36.0 i2pd has several new configuration parameters, the main one of which is meshnets.yggdrasil=true. This setting is independent of IPv4 and IPv6 configuration. In particular, real network interfaces may be disabled. In this case, the I2P router will operate in Yggdrasil-Only mode.

A special resid has also been organized, accessible from Yggdrasil and giving the user a package primarily consisting of well-known routers with an IPv6-Yggdrasil address. Every time you start an I2P router operating in Yggdrasil-Only mode, the local database is checked for available nodes at the transport level, i.e. presence of other nodes with IPv6-Yggdrasil. If for some reason there are no compatible routers in the local database, the Yggdrasil resource is contacted again.

With modern use of Yggdrasil, mostly through overlay connections to public peers via the Internet, the operation of an I2P router in Yggdrasil is comparable to a “Tor-over-VPN” combination: this approach completely hides the fact of using a hidden network from the home provider. In the case of I2P, there is another specific advantage: the user does not need to have a dedicated IP from the provider for trouble-free external calls, because IPv6-Yggdrasil is globally available within the Yggdrasil network segment (a physically connected group of participants, including through public peers on the Internet).

Network integrity

The described solution is not a factor in I2P fragmentation. Building hidden network tunnels is a very intensive and even sophisticated process, which also involves coordinating the transport capabilities of the nodes. By forming a “garlic” - an encrypted message to a group of nodes that should form a tunnel - the router checks their addresses for compatibility. For example, a node with a single IPv4 address will not be instructed to contact an IPv6 address because this is obviously impossible.

In order for a Yggdrasil-Only router to build a tunnel to a node with an address from the regular Internet, at a minimum a transit router will be selected that has two interfaces: IPv6-Yggdrasil and, for example, regular IPv4. In turn, other Yggdrasil-Only routers can also act as transit links in the tunnel, but only for communication with nodes compatible in transport, i.e. also having the Yggdrasil network interface. The greater the number of routers in an I2P network with simultaneously enabled IPv4, IPv6 and Yggdrasil interfaces, the more connected the network.

Connecting to I2P via Yggdrasil
Connecting to I2P via Yggdrasil

Perspective

The example with Yggdrasil is a partial step into the future, and not an end in itself. The described experience of successfully integrating a hidden network into a mesh network is an important conceptual step that, if necessary, will allow the I2P network to be integrated into other mesh networks. The prospect opens up when considering self-organized mesh network segments, for example, in apartment buildings without a centralized provider. In the local network, the Yggdrasil client automatically finds other nodes and communicates with them, acting as a transit node if necessary. When at least one node in such a segment is connected to another network segment (for example, to a global one via the Internet), the networks are automatically united. This approach to organizing a network has become even more realistic, because Now there is a second side of the usual Internet - hidden.


For a more detailed acquaintance with the mentioned technologies, I recommend the articles: about I2P And about Yggdrasil.

Tags:
Hubs:
Всего голосов 32: ↑32 и ↓0 +32
Комментарии 34

Comments 34

Do I understand correctly about the possible problems with the tor output node in our country??
Yggdrasil and I2P do not imply any output proxies by default (as if Tor could only go to .onion sites). However, the administrator has the right to antagonize any services, including outproxy.
But what is an output proxy? This is when you release unidentified users from your address, and, accordingly, are prepared for possible liability for their dubious actions.
Thank you!
I am a very young i2pd user :) I just installed it on two machines, with a real IP and behind NAT. I liked how easily and naturally I threw out my home http server. But then I got paranoid:)
ps on real IP transit ~50 kByte/s for anyone interested.
>But then I got paranoid:)
Here's an article about just that :)

>ps on real IP transit ~50 kB for anyone interested.
1872.07 Kib/s right now. I think you should change the bandwidth parameter to a higher one if the channel allows it
I think you should...
… read the docs:)
Added speed. I didn’t quite understand from the FAQ about Floodfill mode, but it’s probably not me yet.
ps does it make sense to move /var/lib/i2pd/netDb to a RAM disk??
Here is my transit rate with a white IP and floodfiling mode enabled right now (constantly changing) image

As for the http server: I2P is still primarily about anonymity and due to this there is a sacrifice (loss) of speed. For everyday use of home services behind NAT, I advise you to look at Yggdrasil Network.
Greetings.
What can you say about this: habr.com/ru/post/544516/#comment_22749490
Especially in light of the slowdown of Twitter by Roskomnadzor.
The TSPU equipment (filtration subsystem) appears to be working.

Thank you for the article!

More practically, how is this all set up? I know there is i2pd, but I don't know anything about Yggdrasil. What exactly needs to be downloaded/installed/launched to get i2p running via Yggdrasil? Or is it already built into i2pd?
1. Yggdrasil himself
2. i2pd version 2.36 and higher
3. i2pd config parameters for ygg-only Here
4. If you just use ygg as an additional transport, then add meshnets.yggdrasil=true to the i2pd config

Thank you.

For greater clarity, I added a remark to the spoiler “A small note».

Tell me, does Yggdrasil / cjdns allow you to make a VPN? Let's say I have a friend in another country, and I sometimes want to bypass bans, is it possible to do partial routing for banned resources through him? (Currently tinc is used, but it is a bit complicated to set up)

The only problem is with the letter P - in yggdrasil the word Private doesn’t even smell. Simply because the project is aimed at solving other problems. Virtual Open Network?


PS: to implement Private on top of yggdrasil, you can install OpenVPN

The concepts are somewhat different, I agree. However, Yggdrasil has native access restriction tools allowing only a trusted list of keys (specified in the config). This way, only manually added users will be able to connect to the machine's TUN interface. IPv6-Yggdrasil user from outside, untrusted network participants will not even be able to ping, while transit traffic will not be affected in any way.

Ha! But this is absolutely cool! Thank you!

It would be interesting, on the contrary, to launch Yggdrasil over I2P as the only data transmission medium in order to add privacy and complete anonymity to it without losing functionality. Well, or, in general, close the loop Yggdrasil (privacy, convenient) -> I2P (privacy and anonymity, but inconvenient) -> Yggdrasil (privacy + anonymity + convenient).
It is clear that you can configure the exit point in Yggdrasil yourself via the I2P hidden service, but then they will calculate it using it. So, here we need some kind of protocol for searching and exchanging I2P addresses of Yggdrasil nodes that work via I2P.

About exiting from I2P to Yggdrasil and from Yggdrasil to I2P using your own gateway. This can be implemented quite easily by any Proxy Software. If you don’t have your own, but really need it, you can use mine for informational purposes.: http://acetone.i2p/ or http://[324:9de3:fea4:f6ac::ace]/.


It is also possible to send Yggdrasil traffic through an I2P tunnel, but this is a very exotic case that will completely cut off all the speed advantages of Yggdrasil. Probably, in most such cases it will be more convenient to use a Tor proxy.


Regarding the convenience/inconvenience of I2P, I did not understand you. I2Pd is a very concise tool after reading the brief documentation. Everything is intuitive and configurable. For a speculative understanding of the mechanics of the I2P network, I recommend watching the video attached to the post.

The point is to create a secure (private and anonymous) service available to ALL Yggdrasil users WITHOUT installing i2pd on your computer. Privacy and anonymity in this case refers to the owner/host of the service.
Using your own I2P->Yggdrasil gateway eliminates anonymity, because it will be possible to find out the real gateway address. Using a single foreign gateway does not scale.

A primitive solution to your case:


  1. Server with hidden I2P service;
  2. Yggdrasil with local peer discovery disabled and a list of public peers connected via a Tor proxy socks://127.0.0.1:9050/address:port. Nowadays Tor has better throughput and is more suitable for this kind of perversion.
  3. Configuring the availability of a local hidden service on the IPv6-Yggdrasil address.

I2P is a very, very specific network that puts data transfer speed in last place. Really serious resources should not be mirrored “head-on”, but others can be placed completely outside this hidden and difficult-to-access environment for a beginner.

The solution with TOP works, but I2P is not needed there.
In this case, I’m not happy that all traffic will go through Tor exit nodes. While if there was a protocol for resolving I2P addresses, the corresponding nodes could connect directly.
I would actually suggest the following scheme:
1. Yggdrasil running through Tor, which runs on another machine, and does not have access to the network, bypassing Tor.
But here, as it were, there is no I2P.
In this case, I’m not happy that all traffic will go through Tor exit nodes

All Yggdrasil traffic is end-encrypted, malicious Tor exit nodes are not a threat.


if there is a protocol for resolving I2P addresses, the corresponding nodes could connect directly (those. from Yggdrasil directly to I2P and back, as I understand it)

It seems to me that you want to cross a pear with a hedgehog. These are completely different concepts. Surely the theoretical implementation of your proposal is possible, but the integration of a lawn mower into a Formula 1 car is also approximately possible. My position in the discussion of multi-accessibility of all networks from all networks is this: no one simply needs it.

Thor's output nodes are primarily the bottleneck and point of failure. And only then - a threat. Despite encryption, there is a threat to anonymity due to the possibility of correlation attacks.
And there’s no need to make I2P a transparent layer for the user to ensure anonymity in the Yggdrasil network, why not?.

I'll say this for now. As soon as I imagine telling my parents how to get the desktop version of yggdrasil to work, my hair is rising. Wherein version of yggdrasil for android Extremely pleasant to use. There will be an article about my adventures for firewood in yggdrasil, but later - while I’m getting some bumps

What is the “desktop version of yggdrasil”? For me it just runs as a background process, the only result of which is the presence of a tun0 network interface with the corresponding ipv6 address.

original, This, as I understand it, is what we are talking about. They say give everyone a GUI, and let the Satanists have demons running in the background. (With)
kai3341, I'm in the process of writing a big article about Yggdrasil (I don't claim your right to describe the pine cones:)

pureacetone You see, we are dealing with technology, which the more widespread, the better it works. It won't be popular without a GUI. Just try to tell your parents how and why to install yggdrasil on their car. Then it turns out that simply installing yggdrasil is not enough: if the machine is behind NAT, then we dry our oars. You need to register public peers in the config. To do this, you need to tell your parents where the configs are, how to edit them, and which nodes to register. A separate exciting quest is the config syntax, where there will be a separate series of rake. Seriously, how much mass can we talk about??


PS: and special thanks for the upcoming article!

There is a fork Popura from a Russian enthusiast. He implemented a built-in meshname-DNS (I’ll probably write an article about this system based on IPv6 encoding in Base32), as well as auto-peering - automatic addition of public nodes. This character under the nickname zhoreeq lives in ILITA IRC, as I have noticed many times, so if you are interested, take a look (access to Irka via Yggdrasil and I2P).
Fortunately, Yggdrasil is a free project, so the GUI and everything else can be proposed and created by anyone. We are waiting for development. Of course, I am all for the web interface, because... this will allow you to conveniently administer Ygg on remote servers.

Speaking about analogues of Hamachi/RadminVPN, is it possible to fully replace it? That is, two computers have a tunnel through the TAP driver for communication with the functions socket(), bind(), accept() aka accept incoming connections, while both being behind double NAT.

Ideally on Windows.

Yes, that's how it will be if we're talking about Yggdrasil.

Thanks for the answer. I’ve already figured out the network, now I’m just trying to understand whether it’s necessary to make a proxy for programs that don’t know how to use IPv6 (TightVNC for example). Still, I had troubles, in any case, the installer does not want to work on winxp and, in my opinion, on win7, so another question - as I understand it, the program itself consists of yggdrasil.exe, yggdrasilctl.exe, bat for overwriting settings and a wireguard driver. If you can plug in yggdrasil itself as a service using sc or nssm, is it also possible to screw everything else into the system yourself? (like regsvr32 /s wintun.dll or whatever is correct). In any case, I would like to achieve performance on win7, some of my computers are like that, 2yad2gig laptops with Avito for 4 thousand rubles.

Well, a question about IPv4overIPv6 (teredo vice versa), if necessary. I still hope that it is possible to write an IPv6 address in the TightVNC client (if not, then somehow use a crutch, 3proxy or something else).

About creating tunnels with IPv4 addressing through Yggdrasil: up to version 0.4, Yggdrasil supported this natively, but then the option was removed to simplify the client. However, the functionality you need can be find as a separate tool in Neil Alexander's profile (Yggdrasil developer).

About performance on Windows 7: I tested it personally before version 0.4, it worked. Now I recommend looking into the community chat and asking there, because I haven’t seen any official information about the end of support for Windows 7.

Only full-fledged users can leave comments. Sign in, Please.

Publications

Reading now

Stories

Goodness from company blogs
Now say: “I accept the offer.”»
Перевернуть календарь и добавить событие
Менторство в IT
Битва пет-проектов